extends RigidBody3D

var impacted: bool

func _ready() -> void:
	body_entered.connect(on_impact)

func on_impact(body: Node) -> void:
	impacted = true

func _physics_process(delta: float) -> void:
	if impacted and linear_velocity.length() < 0.1:
		freeze = true
